package com.zq.danli;

/**
 * 饿汉单例模式
 */
public class SingletonEHan {

    //构造器私有
    private SingletonEHan(){
    }
    //提供唯一的静态对象
    private static final SingletonEHan SINGLETON_E_HAN=new SingletonEHan();

    //提供公有方法返回对象
    public static SingletonEHan getInstance(){
        return SINGLETON_E_HAN;
    }
}
